<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 团购商品列表 </nav>
<div class="page-container">
  <div class="cl pd-5 bg-1 bk-gray mt-20">
    <div class="text-c">
      <form action="{:url('deal/apply')}" method="get">
		 <span class="select-box inline">
			<select name="category_id" class="select">
              <option value="0">全部分类</option>
              {volist name="categorys" id="vo"}
              <option value="{$vo.id}" {if condition="$vo.id eq $category_id"}selected="selected"{/if}>{$vo.name}</option>
              {/volist}
            </select>
		</span>
		<span class="select-box inline">
			<select name="city_id" class="select">
              <option value="0">全部城市</option>
              {volist name="citys" id="vo"}
              <option value="{$vo.id}" {if condition="$vo.id eq $city_id"}selected="selected"{/if}>{$vo.name}</option>
              {/volist}
            </select>
		</span> 日期范围：
      <input type="text" name="start_time" class="input-text" id="countTimestart" onfocus="selecttime(1)" value="{$start_time}" style="width:120px;" >
      -
      <input type="text" name="end_time" class="input-text" id="countTimestart" onfocus="selecttime(1)" value="{$end_time}"  style="width:120px;">
      <input type="text" name="name" id=""  value="{$name}" placeholder=" 商品名称" style="width:250px" class="input-text">
      <button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索
      </button>
        </form>
    </div>
  </div>
  <div class="mt-20">
    <table class="table table-border table-bordered table-bg table-hover table-sort">
      <thead>
      <tr class="text-c">
        <th width="20">ID</th>
        <th width="100">商品名称</th>
        <th width="40">栏目分类</th>
        <th width="40">城市</th>
        <th width="40">购买件数</th>
        <th width="80">开始结束时间</th>
        <th width="80">创建时间</th>
        <th width="60">状态</th>
        <th width="40">操作</th>
      </tr>
      </thead>
      <tbody>
      {volist name="deals" id="vo"}
      <tr class="text-c">
        <td>{$vo.id}</td>
        <td>{$vo.name}</td>
        <td>{$categoryArrs[$vo.category_id]}</td>
        <td>{$cityArrs[$vo.city_id]}</td>
        <td>{$vo.buy_count}</td>
        <td>{$vo.start_time|date="y-m-d h:i", ###}<br />{$vo.end_time|date="y-m-d h:i", ###}</td>
        <td>{$vo.create_time}</td>
        <td class="td-status"><a href="{:url('deal/status',['id'=>$vo.id, 'status'=>1])}" title="点击修改状态">{$vo.status|status}</a></td>
    <td class="td-manage"> <a style="text-decoration:none" class="ml-5" onClick="o2o_del('{:url('deal/status', ['id'=>$vo.id, 'status'=>-1])}')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a> <a style="text-decoration:none" class="ml-5"  href="{:url('deal/status',['id'=>$vo.id, 'status'=>2])}" title="不通过"><i class="Hui-iconfont">不通过</i></a></td>
      </tr>
      {/volist}
      </tbody>
    </table>
  </div>
    {:pagination($deals)}
</div>
<!--包含头部文件-->
{include file="public/footer" /}
<script src="__STATIC__/admin/hui/lib/My97DatePicker/WdatePicker.js"></script>
